﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microhard.Permission.Interface;

namespace Microhard.Permission.MVCFilter
{
    public class AfterDeleteActionFilter : IAfterActionDataFilter
    {
        #region IAfterActionDataFilter Members

        public void FilterAction(System.Web.Mvc.ActionExecutedContext filterContext, Models.User currentUser)
        {
            //从数据权限中删除数据
            var erdel = filterContext.HttpContext.Items["ToDeleteIds"] as List<Guid>;
            DataPermission.Delete(erdel);
        }

        public IDataPermission DataPermission
        {
            set;
            get;
        }

        #endregion
    }
}
